<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'shops-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'shop_name'); ?>
		<?php echo $form->textField($model,'shop_name',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'shop_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'shop_author'); ?>
		<?php echo $form->textField($model,'shop_author',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'shop_author'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'platform_type'); ?>
		<?php
			if($flag =='create'){
				unset($plats['android']) ;
				echo $form->dropDownList($model , 'platform_type' , $plats ,array('prompt'=>'android') ) ;
			}
			else if($flag =='update'){
				$ns_str = $plats[$model->platform_type] ;
				unset($plats[$ns_str]) ;
				echo $form->dropDownList($model , 'platform_type' , $plats ,array('prompt'=> $ns_str) ) ;
			}
		?>
		<?php echo $form->error($model,'status'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'sumary'); ?>
		<?php echo $form->textArea($model,'sumary',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'sumary'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'img'); ?>
		<?php echo $form->textField($model,'img',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'img'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php
			if($flag =='create'){
				unset($cnstatus[array_search('打开' , $cnstatus)]) ;
				echo $form->dropDownList($model , 'status' , $cnstatus ,array('prompt'=>'打开') ) ;
			}
			else if($flag =='update'){
				$ns_str = $cnstatus[$model->status] ;
				unset($cnstatus[array_search($ns_str, $cnstatus)]) ;
				echo $form->dropDownList($model , 'status' , $cnstatus ,array('prompt'=> $ns_str) ) ;
			}
		?>
		<?php echo $form->error($model,'status'); ?>
	</div>
	
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->